//package com.example.sale.config;
//
//import org.springframework.amqp.core.*;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
////fanout绑定不加花里呼哨的东西不加buindkey，不加#，不加*
//@Configuration
//public class FanoutConfiguration {
//    //申明交换机
//    @Bean
//    public FanoutExchange fanoutExchange(){
//        //ExchangeBuilder.fanoutExchange("").build();
//        return  new FanoutExchange("hmall.fanout2");
//    }
//    //声明队列
//    @Bean
//    public Queue fanoutQueue3(){
//        //QueueBuilder.durable("ff").build();
//        return new Queue("fanout.queue3");
//    }
//    @Bean
//    public Queue fanoutQueue4(){
//        //QueueBuilder.durable("ff").build();
//        return new Queue("fanout.queue4");
//    }
//    //绑定
//    @Bean
//    public Binding fanoutBinding3(Queue fanoutQueue3,FanoutExchange fanoutExchange){
//        return BindingBuilder.bind(fanoutQueue3).to(fanoutExchange);
//    }
//    @Bean
//    public Binding fanoutBinding4(){
//        return BindingBuilder.bind(fanoutQueue4()).to(fanoutExchange());
//    }
//}
